package com.boyunv.chainduty.example02;
/*
 *@description
 *  模拟审核服务
 *@author boyunv
 *@create 2023/8/21 23:10
 *@version 1.0
 */

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

public class AuthService {
    //审核信息容器:  key: 审批人ID+审批单ID  value: 审批时间
    private static Map<String, Date> authMap=new HashMap<>();
    
    /**
     * 审核方法
     * @param uID   审核人ID
     * @param orderID  审核单ID
     */
    public static void  auth(String uID,String orderID){
        System.out.println("进入审批流程,审批人ID"+ uID);
        authMap.put(uID.concat(orderID),new Date());
    }
    
    /**
     * 查询审核结果
     * @param uID
     * @param orderID
     * @return
     */
    public static  Date queryAuthInfo(String uID,String orderID){
        return authMap.get(uID.concat(orderID));
    }
}
